// vim: ff=unix : foldmethod=marker : foldmarker=<<<,>>>
/*
 File: float.h
 Product: NOL Base
 Creating date: 06/01/2005 15:02
 Remark: 
*/
#ifndef lite_floatH
#define lite_floatH

#include <math.h>
#include "lite/define.h"

typedef float f4_t; //float 4byte
typedef f4_t *  f4_p; typedef f4_p *  f4_pp;
typedef double f8_t; //float 8byte
typedef f8_t *  f8_p; typedef f8_p *  f8_pp;

typedef double f_t; //float
typedef f_t *  f_p; typedef f_p *  f_pp;

#define F8_MAX 1.7976931348623158e+308
#define F8_MIN 2.2250738585072014e-308 
#define F4_MAX 3.402823466e+38
#define F4_MIN 1.175494351e-38
#define F_PI 3.14159265358979323846
#define F_E 2.71828182845904523536
#define F_SQRT3 1.7320508075688772935
#define F_SQRT2 1.4142135623730950488

#define fint floor 
inline_q f_t ffrc(f_t f) 
 { f_t aux=f-floor(f); if (aux<0) return 1.0+aux; return aux; };
//#define fabs fabs
#define fatan2 atan2
#define fatan atan
//f_t fasin(f_t);
//f_t facos(f_t);
#define fsin sin
#define fcos cos
#define ftan tan
#define fsqrt sqrt
#define fsqr(x) ((x)*(x))
#define fln log
#define flg log10
//f_t flog2(f_t);
#define fexp exp
//f_t fpow(f_t,f_t);
//f_t fpow2(f_t);

#endif
